package com.cnfangmao.masterdata.common.constant;

import java.util.Arrays;
import java.util.List;

/**
 * @description: 常量定义
 * @author: chenxc
 * @date: 2020年4月8日 下午11:47:54
 */
public class Constant {
	
	/**
	 * ================定义主数据的存储引擎================
	 */
	public static final String STAGE_MASTERDATA_STORAGE_ENGINE = "mongodb_stage";
	public static final String NORMAL_MASTERDATA_STORAGE_ENGINE = "mongodb_normal";
	public static final String HISTORY_MASTERDATA_STORAGE_ENGINE = "mongodb_history";
	
	/**
	 * 临时存储区的表名
	 */
	public static final String STAGE_MASTERDATA_STORAGE_TABLENAME = "t_basicdata_stage";
	/**
	 * 历史版本存储区的表名后缀
	 */
	public static final String HISTORY_MASTERDATA_STORAGE_TABLENAME_SUFFIX = "_history";
	
	/**
	 * ================查询条件前缀================
	 */
	/**
	 * 模糊查询
	 */
	public static final String QUERY_CONDITION_PREFIX_LIKE = "__like_"; 
	/**
	 * 大于查询
	 */
	public static final String QUERY_CONDITION_PREFIX_GT = "__gt_";
	/**
	 * 大于等于查询
	 */
	public static final String QUERY_CONDITION_PREFIX_GTE = "__gte_";
	/**
	 * 小于查询
	 */
	public static final String QUERY_CONDITION_PREFIX_LT = "__lt_";
	/**
	 * 小于等于查询
	 */
	public static final String QUERY_CONDITION_PREFIX_LTE = "__lte_";
	/**
	 * 等于查询
	 */
	public static final String QUERY_CONDITION_PREFIX_IS = "__is_";
	
	public final static List<String> LIST_QUERY_CONDITION_PREFIX = Arrays.asList(
			QUERY_CONDITION_PREFIX_LIKE,
			QUERY_CONDITION_PREFIX_GT,
			QUERY_CONDITION_PREFIX_GTE,
			QUERY_CONDITION_PREFIX_LT,
			QUERY_CONDITION_PREFIX_LTE,
			QUERY_CONDITION_PREFIX_IS
			);
}
